#include<bits/stdc++.h>
#define int long long
#define MOD 998244353
#define REP(i,a,n) for(int i=(a);i<(int)(n);++i)
#define pb push_back
#define pii pair<int,int>
#define all(v) v.begin(),v.end()
#define deal(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define lbound(v,x) (lower_bound(all(v),x)-v.begin())
using namespace std;
int read(){
    int res=0;char c=getchar();
    while(c<48||c>57)c=getchar();
    do res=(res<<1)+(res<<3)+(c^48),c=getchar();while(c>=48&&c<=57);
    return res;
}
int n;
int a[100005];
void Main(){
    cin>>n;
    REP(i,0,n)cin>>a[i];
    sort(a,a+n);
    int ans=0,x=0;
    REP(i,0,n){
        x=max(x,i+1);
        while(x<n&&a[x]<=a[i])++x;
        if(x>=n)break;
        ++ans;++x;
    }
    cout<<n-ans<<endl;
}
signed main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    int tc=1;
    while(tc--)Main();
    return 0;
}